package com.itheima.mentalarithmeticpracticesystem;

import com.itheima.test.Calculator;
import com.itheima.test.MathTest;

/**
 * 除法类
 */
public class DivideTest extends MathTest implements Calculator {
    public DivideTest() {
    }

    public DivideTest(int x, int y) {
        super(x, y);
    }

    /**
     * 计算
     * @return
     */
    @Override
    public int calculate() {
        int s=this.getX()/this.getY();
        return s;
    }

    @Override
    public String getQuestion() {
        System.out.println("这是一道除法题，只要回答商就行，余数不考虑");
        return this.getX()+"/"+this.getY()+"= ?";
    }
}
